package com.zjw.nanyinge.service.impl;

import com.zjw.nanyinge.dao.MessageMapper;
import com.zjw.nanyinge.model.Message;
import com.zjw.nanyinge.service.MessageService;
import com.zjw.nanyinge.vo.req.MessageVO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MessageServiceImpl implements MessageService {

    @Resource
    private MessageMapper messageMapper;

    @Override
    public void addMessage(MessageVO messageVO) {
        Message message = new Message();
        BeanUtils.copyProperties(messageVO, message);
        messageMapper.add(message);
    }
}
